home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-23 | 34.4 KB | 1,345 lines |
- TABLE OF CONTENTS
-
- XOpenDisplay
- XCloseDisplay
- XCreateSimpleWindow
- XCreateWindow
- XDestroyWindow
- XMapRaised
- XMapWindow
- XUnmapWindow
- XStoreName
- XGetWindowAttributes
- XConfigureWindow
- XCreateGC
- XFreeGC
- XGetVisualInfo
-
- XDrawArc
- XDrawArcs
- XFillArc
- XFillArcs
- XDrawPoint
- XDrawPoints
- XDrawLine
- XDrawLines
- XDrawRectangle
- XDrawRectangles
- XFillRectangle
- XFillRectangles
- XFillPolygon
- XDrawString
- XClearWindow
- XSetForeground
- XSetBackground
-
- XNextEvent
- XPending
- XPeekEvent
- XSelectInput
- XLookupString
- XFlush
- XQueryPointer
-
- XSetClipRectangles
- XSetPlaneMask
-
- XStoreColor
- XStoreColors
- XQueryColors
- XAllocNamedColor
- XAllocColorCells
- XParseColor
- XCreateColormap
- XFreeColormap
- XFreeColors
- XLookupColor
- XAllocColor
- XDefaultColormap
-
- XCreateImage
- XPutImage
-
- XCreatePixmap
- XFreePixmap
-
- XtOpenDisplay
- XtCloseDisplay
- XtParseTranslationTable
- XtAppAddActions
- XtAppNextEvent
- XtAppAddTimeOut
- XtAppMainLoop
- XtAppCreateShell
- XtAppInitialize
-
- XmuGetHostname
- X_GETTIMEOFDAY
- XBell
- XNoOp
- gettimeofday
-
- XDisplayWidth
- XDisplayHeight
- XDisplayCells
-
- XOpenDisplay
-
- NAME
- XOpenDisplay - connect a client program to an X server.
-
- Synopsis
- Display *XOpenDisplay(display_name)
- char *display_name;
-
- Arguments
- display_name
- Specifies the display name, which determines the server to
- connect to and the communications domain to be used. See
- Description below.
-
- Description
- This function opens libraries that are needed for the X11 functions to work.
- It also checks for the os version and what display type is available (PAL/NTSC-
- AGA/ECS). These values are stored in X11 structures:
-
- Display amigaX_display;
- Screen amiga_screen;
-
- These structures are accessed through definitions in the includes. Like these
- from X11/Xlib.h:
-
- #define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
- #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
-
- If you specify a public screen as parameter then the programs will open
- windows on this screen unless it is too big for this screen. If the window
- is bigger than the screen, a new screen will be opened that can handle the
- size of the window.
-
- XCloseDisplay
-
- NAME
- XCloseDisplay - disconnect a client program from an X server and
- display.
-
- Synopsis
- XCloseDisplay(display)
- Display *display;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- Description
- This function closes the libraries opened in XOpenDisplay along with some
- other cleanup operations. Some unix/X11 programs relies on unix to take
- care of all the cleanup of allocated memory, this isn't such a good idea
- under AmigaDos!
-
- XCreateSimpleWindow
-
- NAME
- XCreateSimpleWindow - create an unmapped InputOutput window.
-
- Synopsis
- Window XCreateSimpleWindow(display, parent, x, y, width, height,
- border_width, border, background)
- Display *display;
- Window parent;
- int x, y;
- unsigned int width, height, border_width;
- unsigned long border;
- unsigned long background;
-
- Arguments
- display Specifies a pointer to the Display structure; returned from
- XOpenDisplay().
-
- parent Specifies the parent window ID. Must be an InputOutput
- window.
-
- x
- y
- Specify the x and y coordinates of the upper-left pixel of
- the new window's border relative to the origin of the parent
- (inside the parent window's border).
-
- width
- height
- Specify the width and height, in pixels, of the new window.
- These are the inside dimensions, not including the new
- window's borders, which are entirely outside of the window.
- Must be nonzero. Any part of the window that extends outside
- its parent window is clipped.
-
- border_width
- Specifies the width, in pixels, of the new window's border.
-
- border Specifies the pixel value for the border of the window.
-
- background
- Specifies the pixel value for the background of the window.
-
- Description
- This function creates an amiga window either on the workbench (or public
- screen) if the requested size is within the size of the workbench or
- on a custom screen if this is not the case.
-
- XCreateWindow
-
- NAME
- XCreateWindow - create a window and set attributes.
-
- Synopsis
- Window XCreateWindow(display, parent, x, y, width, height,
- border_width, depth, class, visual, valuemask,
- attributes)
- Display *display;
- Window parent;
- int x, y;
- unsigned int width, height;
- unsigned int border_width;
- int depth;
- unsigned int class;
- Visual *visual
- unsigned long valuemask;
- XSetWindowAttributes *attributes;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- parent Specifies the parent window. Parent must be InputOutput if
- class of window created is to be InputOutput.
-
- x
- y
- Specify the x and y coordinates of the upper-left pixel of
- the new window's border relative to the origin of the parent
- (upper left inside the parent's border).
-
- width
- height
- Specify the width and height, in pixels, of the window.
- These are the new window's inside dimensions. These
- dimensions do not include the new window's borders, which are
- entirely outside of the window. Must be nonzero, otherwise
- the server generates a BadValue error.
-
- border_width
- Specifies the width, in pixels, of the new window's border.
- Must be 0 for InputOnly windows, otherwise a BadMatch error
- is generated.
-
- depth Specifies the depth of the window, which can be different
- from the parent's depth. A depth of CopyFromParent means the
- depth is taken from the parent. Use XListDepths() if
- choosing an unusual depth. The specified depth paired with
- the visual argument must be supported on the screen.
-
- class Specifies the new window's class. Pass one of these
- constants: InputOutput, InputOnly, or CopyFromParent.
-
- visual Specifies a connection to an visual structure describing the
- style of colormap to be used with this window.
- CopyFromParent is valid.
-
- valuemask
- Specifies which window attributes are defined in the
- attributes argument. If valuemask is 0, attributes is not
- referenced. This mask is the bitwise OR of the valid
- attribute mask bits listed in the Structures section below.
-
- attributes
- Attributes of the window to be set at creation time should
- be set in this structure. The valuemask should have the
- appropriate bits set to indicate which attributes have been
- set in the structure.
-
- Description
- Currently just calls XCreateSimpleWindow.
-
- XDestroyWindow
-
- NAME
- XDestroyWindow - unmap and destroy a window and all subwindows.
-
- Synopsis
- XDestroyWindow(display, w)
- Display *display;
- Window w;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the ID of the window to be destroyed.
-
- Description
- Destroys the window created by XCreateWindow or XCreateSimpleWindow.
-
- XMapRaised
-
- NAME
- XMapRaised - map a window on top of its siblings.
-
- Synopsis
- XMapRaised(display, w)
- Display *display;
- Window w;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the window ID of the window to be mapped and
- raised.
-
- Description
- If the window is a child of another window its borders is drawn. If it is
- a root window ActivateWindow is called. WindowToFront should probably be called.
-
- XUnmapWindow
-
- NAME
- XUnmapWindow - unmap a window.
-
- Synopsis
- XUnmapWindow(display, w)
- Display *display;
- Window w;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the window ID.
-
- Description
- it the window is a root window it is closed. otherwise nothing is done.
- This is slightly asymetric to the way X11 does it since no window is opened
- when calling XCreateWindow under X11. It is opened on XMapWindow and closed
- on XUnmapWindow.
-
- XMapWindow
-
- NAME
- XMapWindow - map a window.
-
- Synopsis
- XMapWindow(display, w)
- Display *display;
- Window w;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the ID of the window to be mapped.
-
- Description
- Nothing happens..
-
- XStoreName
-
- NAME
- XStoreName - assign a name to a window.
-
- Synopsis
- XStoreName(display,w,window_name)
- Display *display;
- Window w;
- char *window_name;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the ID of the window to which you want to assign a
- name.
- window_name
- Specifies the name of the window. The name should be a null-
- terminated string. If the string is not in the Host Portable
- Character Encoding, the result is implementation-dependent. This
- name is returned by any subsequent call to
- Description
- Set Window name.
-
- XGetWindowAttributes
-
- NAME
- XGetWindowAttributes - obtain the current attributes of window.
-
- Synopsis
- Status XGetWindowAttributes(display, w, window_attributes_return)
- Display *display;
- Window w;
- XWindowAttributes *window_attributes_return;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the window whose current attributes you want.
-
- window_attributes_return
- Returns a filled XWindowAttributes structure, containing the
- current attributes for the specified window.
-
- Description
- returns the window attributes.
-
- XConfigureWindow
-
- NAME
- XConfigureWindow - change the window position, size, border width, or
- stacking order.
-
- Synopsis
- XConfigureWindow(display, w, value_mask, values)
- Display *display;
- Window w;
- unsigned int value_mask;
- XWindowChanges *values;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the ID of the window to be reconfigured.
-
- value_mask
- Specifies which values are to be set using information in
- the values structure. value_mask is the bitwise OR of any
- number of symbols listed in the Structures section below.
-
- values Specifies a pointer to the XWindowChanges structure
- containing new configuration information. See the
- Structures section below.
-
- Description
- Sets the window size.
-
- XCreateGC
-
- NAME
- XCreateGC - create a new graphics context for a given screen with the
- depth of the specified drawable.
-
- Synopsis
- GC XCreateGC(display, drawable, valuemask, values)
- Display *display;
- Drawable drawable;
- unsigned long valuemask;
- XGCValues *values;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies a drawable. The created GC can only be used to
- draw in drawables of the same depth as this drawable.
-
- valuemask Specifies which members of the GC are to be set using
- information in the values structure. valuemask is made by
- combining any number of the mask symbols listed in the
- Structures section.
-
- values Specifies a pointer to an XGCValues structure which will
- provide components for the new GC.
-
- Description
- XCreateGC() creates a new graphics context resource in the server.
- The returned GC can be used in subsequent drawing requests.
-
- XFreeGC
-
- NAME
- XFreeGC - free a graphics context.
-
- Synopsis
- XFreeGC(display, gc)
- Display *display;
- GC gc;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- gc Specifies the graphics context to be freed.
-
- Description
- XFreeGC() frees all memory associated with a graphics context, and
- removes the GC from the server and display hardware.
-
- XGetVisualInfo
-
- NAME
- XGetVisualInfo - find the visual information structures that match the
- specified template.
-
- Synopsis
- XVisualInfo *XGetVisualInfo(display, vinfo_mask,
- vinfo_template, nitems_return)
- Display *display;
- long vinfo_mask;
- XVisualInfo *vinfo_template;
- int *nitems_return;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- vinfo_mask
- Specifies the visual mask value. Indicates which elements
- in template are to be matched.
-
- vinfo_template
- Specifies the visual attributes that are to be used in
- matching the visual structures.
-
- nitems_return
- Returns the number of matching visual structures.
-
- Description
- XGetVisualInfo() returns a list of visual structures that describe
- visuals supported by the server and that match the attributes
- specified by the vinfo_template argument.
-
- Currently this is rather simple but it returns values that match the
- Workbench screen.
-
- XDrawArc
-
- NAME
- XDrawArc - draw an arc fitting inside a rectangle.
-
- Synopsis
- XDrawArc(display, drawable, gc, x, y, width, height,
- angle1, angle2)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
- unsigned int width, height;
- int angle1, angle2;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x
- y
- Specify the x and y coordinates of the upper-left corner of
- the rectangle that contains the arc, relative to the origin
- of the specified drawable.
-
- width
- height
- Specify the width and height in pixels of the major and
- minor axes of the arc.
-
- angle1 Specifies the start of the arc relative to the three-o'clock
- position from the center. Angles are specified in 64ths of
- a degree (360 * 64 is a complete circle).
-
- angle2 Specifies the end of the arc relative to the start of the
- arc. Angles are specified in 64ths of a degree (360 * 64 is
- a complete circle).
-
- Description
- Works!
-
- XDrawArcs
-
- NAME
- XDrawArcs - draw multiple arcs.
-
- Synopsis
- XDrawArcs(display, drawable, gc, arcs, narcs)
- Display *display;
- Drawable drawable;
- GC gc;
- XArc *arcs;
- int narcs;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- arcs Specifies a pointer to an array of arcs.
-
- narcs Specifies the number of arcs in the array.
-
- Description
- Calls XDrawArc for each arc in the arcs array.
-
- XFillArc
-
- NAME
- XFillArc - fill an arc.
-
- Synopsis
- XFillArc(display, drawable, gc, x, y, width, height,
- angle1, angle2)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
- unsigned int width, height;
- int angle1, angle2;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x
- y
- Specify the x and y coordinates of the upper-left corner of
- the bounding box containing the arc, relative to the origin
- of the drawable.
-
- width
- height
- Specify the width and height in pixels. These are the major
- and minor axes of the arc.
-
- angle1 Specifies the start of the arc relative to the three-o'clock
- position from the center. Angles are specified in 64ths of
- degrees.
-
- angle2 Specifies the path and extent of the arc relative to the
- start of the arc. Angles are specified in 64ths of degrees.
-
- Description
- Works!
-
- XFillArcs
-
- NAME
- XFillArcs - fill multiple arcs.
-
- Synopsis
- XFillArcs(display, drawable, gc, arcs, narcs)
- Display *display;
- Drawable drawable;
- GC gc;
- XArc *arcs;
- int narcs;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- arcs Specifies a pointer to an array of arc definitions.
-
- narcs Specifies the number of arcs in the array.
-
- Description
- Calls XFillArc for each arc in the arcs array.
-
- XDrawPoint
-
- NAME
- XDrawPoint - draw a point.
-
- Synopsis
- XDrawPoint(display, drawable, gc, x, y)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x
- y
- Specify the x and y coordinates of the point, relative to
- the origin of the drawable.
-
- Description
- Draws a point!
-
- XDrawPoints
-
- NAME
- XDrawPoints - draw multiple points.
-
- Synopsis
- XDrawPoints(display, drawable, gc, points, npoints, mode)
- Display *display;
- Drawable drawable;
- GC gc;
- XPoint *points;
- int npoints;
- int mode;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- points Specifies a pointer to an array of XPoint structures
- containing the positions of the points.
-
- npoints Specifies the number of points to be drawn.
-
- mode Specifies the coordinate mode. CoordModeOrigin treats all
- coordinates as relative to the origin, while
- CoordModePrevious treats all coordinates after the first as
- relative to the previous point, while the first is still
- relative to the origin.
-
- Description
- Calls XDrawPoint for each point in the points array.
-
- XDrawLine
-
- NAME
- XDrawLine - draw a line between two points.
-
- Synopsis
- XDrawLine(display, drawable, gc, x1, y1, x2, y2)
- Display *display;
- Drawable drawable;
- GC gc;
- int x1, y1, x2, y2;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x1
- y1
- x2
- y2
- Specify the coordinates of the endpoints of the line
- relative to the drawable origin. XDrawLine() connects point
- (x1,y1) to point (x2,y2).
-
- Description
- Works!
-
- XDrawLines
-
- NAME
- XDrawLines - draw multiple connected lines.
-
- Synopsis
- XDrawLines(display, drawable, gc, points, npoints, mode)
- Display *display;
- Drawable drawable;
- GC gc;
- XPoint *points;
- int npoints;
- int mode;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- points Specifies a pointer to an array of points.
-
- npoints Specifies the number of points in the array.
-
- mode Specifies the coordinate mode. Pass either CoordModeOrigin
- or CoordModePrevious.
-
- Description
- Calls XDrawLine for each line described by the points array.
-
- XDrawRectangle
-
- NAME
- XDrawRectangle - draw an outline of a rectangle.
-
- Synopsis
- XDrawRectangle(display, drawable, gc, x, y, width, height)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
- unsigned int width, height;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x
- y
- Specify the x and y coordinates of the upper-left corner of
- the rectangle, relative to the drawable's origin.
-
- width
- height
- Specify the width and height in pixels. These dimensions
- define the outline of the rectangle.
-
- Description
- ok.
-
- XDrawRectangles
-
- NAME
- XDrawRectangles - draw the outlines of multiple rectangles.
-
- Synopsis
- XDrawRectangles(display, drawable, gc, rectangles, nrectangles)
- Display *display;
- Drawable drawable;
- GC gc;
- XRectangle rectangles[];
- int nrectangles;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- rectangles
- Specifies a pointer to an array of rectangles containing
- position and size information.
-
- nrectangles
- Specifies the number of rectangles in the array.
-
- Description
- ok.
-
- XFillRectangle
-
- NAME
- XFillRectangle - fill a rectangular area.
-
- Synopsis
- XFillRectangle(display, drawable, gc, x, y, width, height)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
- unsigned int width, height;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x
- y
- Specify the x and y coordinates of the upper-left corner of
- the rectangle, relative to the origin of the drawable.
-
- width
- height
- Specify the dimensions in pixels of the rectangle to be
- filled.
-
- Description
- ok!
-
- XFillRectangles
-
- NAME
- XFillRectangles - fill multiple rectangular areas.
-
- Synopsis
- XFillRectangles(display, drawable, gc, rectangles, nrectangles)
- Display *display;
- Drawable drawable;
- GC gc;
- XRectangle *rectangles;
- int nrectangles;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- rectangles
- Specifies a pointer to an array of rectangles.
-
- nrectangles
- Specifies the number of rectangles in the array.
-
- Description
- ok!
-
- XFillPolygon
-
- NAME
- XFillPolygon - fill a polygon.
-
- Synopsis
- XFillPolygon(display, drawable, gc, points, npoints, shape, mode)
- Display *display;
- Drawable drawable;
- GC gc;
- XPoint *points;
- int npoints;
- int shape;
- int mode;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- points Specifies a pointer to an array of points.
-
- npoints Specifies the number of points in the array.
-
- shape Specifies an argument that helps the server to improve
- performance. Pass the last constant in this list that is
- valid for the polygon to be filled: Complex, Nonconvex, or
- Convex.
-
- mode Specifies the coordinate mode. Pass either CoordModeOrigin
- or CoordModePrevious.
-
- Description
- ok!
-
- XDrawString
-
- NAME
- XDrawString - draw an 8-bit text string, foreground only.
-
- Synopsis
- XDrawString(display, drawable, gc, x, y, string, length)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
- char *string;
- int length;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- drawable Specifies the drawable.
-
- gc Specifies the graphics context.
-
- x
- y
- Specify the x and y coordinates of the baseline starting
- position for the character, relative to the origin of the
- specified drawable.
-
- string Specifies the character string.
-
- length Specifies the number of characters in string.
-
- Description
- Fairly simple at the moment, no font mapping is done.
-
- XClearWindow
-
- NAME
- XClearWindow - clear an entire window.
-
- Synopsis
- XClearWindow(display, w)
- Display *display;
- Window w;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the ID of the window to be cleared.
-
- Description
- ok!
-
- XSetForeground
-
- NAME
- XSetForeground - set the foreground pixel value in a graphics context.
-
- Synopsis
- XSetForeground(display, gc, foreground)
- Display *display;
- GC gc;
- unsigned long foreground;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- gc Specifies the graphics context.
-
- foreground
- Specifies the foreground pixel value you want for the
- specified graphics context.
-
- Description
- ok.
-
- XSetBackground
-
- NAME
- XSetBackground - set the background pixel value in a graphics context.
-
- Synopsis
- XSetBackground(display, gc, background)
- Display *display;
- GC gc;
- unsigned long background;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- gc Specifies the graphics context.
-
- background
- Specifies the background component of the GC.
-
- Description
- ok.
-
- XNextEvent
-
- NAME
- XNextEvent - get the next event of any type or window.
-
- Synopsis
- XNextEvent(display, event_return)
- Display *display;
- XEvent *event_return;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- event_return
- Returns the event removed from the event queue.
-
- Description
- Fairly simple but seems to work ok.
-
- XPending
-
- NAME
- XPending - return the number of pending events.
-
- Synopsis
- int XPending(display)
- Display *display;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- Description
- Returns 1 if there is any IntuiMessage waiting. 0 otherwise.
-
- XPeekEvent
-
- NAME
- XPeekEvent - get an event without removing it from the queue.
-
- Synopsis
- XPeekEvent(display, event_return)
- Display *display;
- XEvent *event_return;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- report_return
- Returns the event peeked from the input queue.
-
- Description
- Returns one IntuiMessage, but doesn't delete it.
-
- XSelectInput
-
- NAME
- XSelectInput - select the event types to be sent to a window.
-
- Synopsis
- XSelectInput(display, w, event_mask)
- Display *display;
- Window w;
- long event_mask;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies the ID of the window interested in the events.
-
- event_mask
- Specifies the event mask. This mask is the bitwise OR of
- one or more of the valid event mask bits (see below).
-
- Description
- Amazingly simple at the moment!
-
- XLookupString
-
- NAME
- XLookupString - map a key event to ASCII string, keysym, and
- ComposeStatus.
-
- Synopsis
- int XLookupString(event_structure, buffer_return, bytes_buffer,
- keysym_return, status_in_out)
- XKeyEvent *event_structure;
- char *buffer_return;
- int bytes_buffer;
- KeySym *keysym_return;
- XComposeStatus *status_in_out;/* may not be implemented */
-
- Arguments
- event_structure
- Specifies the key event to be used.
-
- buffer_return
- Returns the resulting string (not NULL terminated).
- Returned value of the function is the length of the string.
-
- bytes_buffer
- Specifies the length of the buffer. No more than
- bytes_buffer of translation are returned.
-
- keysym_return
- If this argument is not NULL, it specifies the keysym ID
- computed from the event.
-
- status_in_out
- Specifies the XComposeStatus structure that contains compose
- key state information and that allows the compose key
- processing to take place. This can be NULL if the caller is
- not interested in seeing compose key sequences. Not
- implemented in X Consortium Xlib through Release 5.
-
- Description
- Returns the last pressed key.
-
- XFlush
-
- NAME
- XFlush - send all queued requests to the server.
-
- Synopsis
- XFlush(display)
- Display *display;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- Description
- Calls ReplyMsg until no IntuiMessage is waiting.
-
- XQueryPointer
-
- NAME
- XQueryPointer - get the current pointer location.
-
- Synopsis
- Bool XQueryPointer(display, w, root_return, child_return,
- root_x_return, route_y_return,
- win_x_return, win_y_return, mask_return)
- Display *display;
- Window w;
- Window *root_return, *child_return;
- int *root_x_return, *route_y_return;
- int *win_x_return, *win_y_return;
- unsigned int *mask_return;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- w Specifies a window which indicates which screen the pointer
- position is returned for, and child_return will be a child of
- this window if pointer is inside a child.
-
- root_return
- Returns the root window ID the pointer is currently on.
-
- child_return
- Returns the ID of the child of w the pointer is located in,
- or zero if it not in a child.
-
- root_x_return
- route_y_return
- Return the x and y coordinates of the pointer relative to the
- root's origin.
-
- win_x_return
- win_y_return
- Return the x and y coordinates of the pointer relative to the
- origin of window w.
-
- mask_return
- Returns the current state of the modifier keys and pointer
- buttons. This is a mask composed of the OR of any number of
- the following symbols: ShiftMask, LockMask, ControlMask,
- Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask, Button1-
- Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask.
-
- Description
- returns current pointer position and buttonvalues.
-
- XBell
-
- NAME
- XBell - ring the bell (Control G).
-
- Synopsis
- XBell(display, percent)
- Display *display;
- int percent;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- percent Specifies the volume for the bell, relative to the base
- volume set with XChangeKeyboardControl(). Possible values
- are - 100 (off), through 0 (base volume), to 100 (loudest)
- inclusive.
-
- Description
- printf("%c",7);
-
- XNoOp
-
- NAME
- XNoOp - send a NoOp to exercise connection with the server.
-
- Synopsis
- XNoOp(display)
- Display *display;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- Description
- Doesn't do anything!
-
- XDisplayWidth
-
- NAME
- XDisplayWidth - query width of screen in pixels.
-
- Synopsis
- int XDisplayWidth(display, screen_number)
- Display *display;
- int screen_number;
- int XDisplayWidthMM(display, screen_number)
- Display *display;
- int screen_number;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- screen_number
- Specifies the appropriate screen number on the server.
-
- Description
- Returns the screen's width, probably the workbench screen unless a public screen
- has been opened.
-
- XDisplayHeight
-
- NAME
- XDisplayHeight - query height of screen in pixels.
-
- Synopsis
- int XDisplayHeight(display, screen_number)
- Display *display;
- int screen_number;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- screen_number
- Specifies the appropriate screen number on the server.
-
- Description
- Returns the screen's height, probably the workbench screen unless a public screen
- has been opened.
-
- XDisplayCells
-
- NAME
- XDisplayCells, DisplayCells - query number of cells in default
- colormap of screen.
-
- Synopsis
- int XDisplayCells(display, screen_number)
- Display *display;
- int screen_number;
-
- Arguments
- display Specifies a connection to an X server; returned from
- XOpenDisplay().
-
- screen_number
- Specifies the appropriate screen number on the host server.
-
- Description
- Returns the screen's depth, probably the workbench screen unless a public screen
- has been opened.
-